package cn.hnucm.web;

import cn.hncum.feign.clients.UserClient;
import cn.hnucm.bean.TbUserSign;
import cn.hnucm.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:liweihua
 * @Description:
 * @Date: 18:31$ 2021/12/18/018$
 * @Modified:
 */
@RestController
public class SignController {
    @Autowired
    UserClient userClient;
    @RequestMapping("/auth/sign")
    public Result sign(@RequestBody(required = false) TbUserSign tbUserSign){
        System.out.println(tbUserSign);
        boolean b = userClient.addUserSign(tbUserSign);
        if(b){
            return Result.ok("注册成功");
        }
        return Result.error("注册失败");
    }
}
